//
//  YMHomeIntroduceCell.m
//  YMMedical
//
//  Created by y s on 2023/7/19.
//

#import "YMHomeIntroduceCell.h"

@interface YMHomeIntroduceCell ()

@property (nonatomic, strong) UIView *vBg;
@property (nonatomic, strong) UILabel *lblIntro;

@end

@implementation YMHomeIntroduceCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUI];
    }
    return self;
}

#pragma mark - UI methods
- (void)setUI{
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.contentView.backgroundColor = [UIColor clearColor];
    self.backgroundColor = [UIColor clearColor];
    
    [self.contentView addSubview:self.vBg];
    [self.vBg addSubview:self.lblIntro];
    
    [self.vBg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo([SFitUtil fit:-2]);
        make.left.mas_equalTo([SFitUtil fit:15]);
        make.right.mas_equalTo([SFitUtil fit:-15]);
        make.top.mas_equalTo(0);
    }];
    [self.lblIntro mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo([SFitUtil fit:15]);
        make.left.mas_equalTo([SFitUtil fit:15]);
        make.right.mas_equalTo([SFitUtil fit:-15]);
        make.bottom.mas_equalTo([SFitUtil fit:-15]);
    }];
}


#pragma mark - public methods
- (void)setStrIntroduce:(NSString *)strIntroduce{
    _strIntroduce = strIntroduce;
    self.lblIntro.text = strIntroduce;
}

#pragma mark - Event Action



#pragma mark - setter and getter
- (UIView *)vBg{
    if (_vBg == nil){
        _vBg = [[UIView alloc] init];
        _vBg.backgroundColor = STheme.D9;
        _vBg.layer.cornerRadius = [SFitUtil fit:8];
        _vBg.clipsToBounds = YES;
    }
    return _vBg;
}
- (UILabel *)lblIntro{
    if (_lblIntro == nil){
        _lblIntro = [[UILabel alloc] init];
        _lblIntro.textColor = STheme.D3;
        _lblIntro.font = [SFitUtil fitFont:14];
        _lblIntro.numberOfLines = 0;
    }
    return _lblIntro;
}


@end
